import datetime


class Notice:
    def __init__(self,
                 noticeID: int = None, # key
                 type: str = None,
                 time: datetime = None,
                 priority: int = 0,
                 content: str = None,
                 userID: str = None):
        self.noticeID = noticeID
        self.type = type
        self.time = time
        self.priority = priority
        self.content = content
        self.userID = userID

    def to_string(self):
        return 'noticeID: {}, type: {}, time: {}, priority: {}, content: "{}", userID: {}'.format(
            self.noticeID, self.type, self.time, self.priority, self.content, self.userID)
